#ifndef TIMINGLISTDIALOG_H
#define TIMINGLISTDIALOG_H

#define debug_zsb
#include <QDialog>
#include<QTableWidget>
#include<QDateTime>
#include<QString>
#include<QMessageBox>
#include<QDebug>
#include<QTimer>
#include<QTime>
#include"com.h"

namespace Ui {
    class TimingListDialog;
}

class TimingListDialog : public QDialog
{
    Q_OBJECT

public:
    explicit TimingListDialog(QWidget *parent = 0);
    ~TimingListDialog();
    void addItem(QString name,QDateTime startTime,QDateTime endTime,bool status,QString startCmd,QString endCmd);
    void addItem(QString name,QTime startTime,QTime endTime,bool status,QString startCmd,QString endCmd);
    void setCom(COM *paramCOM);
    void setTimingTaskCount();
    int getTimingTaskCount();
    int getValidTimingTaskCount();
private slots:
    void on_pushButton_3_clicked();
    void checkTimingTask();
signals:
    void timingTaskCountEqualZero();
    void timingTaskCountNotequalZero();

private:
    Ui::TimingListDialog *ui;
    COM *com;
    QTimer *timer;
    int timingTaskCount ;
private slots:
    void on_pushButton_2_clicked();
    void on_pushButton_clicked();
};

#endif // TIMINGLISTDIALOG_H
